#ifndef BULLUET_H
#define BULLUET_H

#include <QPoint>
#include <QSize>
#include <QPixmap>
#include <QObject>
#include<QPropertyAnimation>
#include<QPainter>
#include"window2.h"

#include"enemy1.h"
class QPainter;
class Enemy;
class window2;

class bullet : public QObject
{
    Q_OBJECT

    Q_PROPERTY(QPoint current_pos READ getcurrent_pos WRITE setcurrent_pos)

public:

    bullet(QPoint start_pos,QPoint end_pos,int damage,Enemy *Target_enemy,window2 *game,QString filename);
    void draw(QPainter *painter);
    void move();
    QPoint getcurrent_pos();
    void setcurrent_pos(QPoint pos);


private slots:
    void hit_enemy();
protected:
    QPoint start_pos;
    QPoint end_pos;
    QPoint current_pos;

    QPixmap picture;
    window2 *game;
    Enemy *Target_enemy;
    int _damage;
    QSize pic_size;

signals:

};









#endif // BULLET_H
